<template>
  <div>
    <a-table style="margin-bottom: 32px" :rowKey="(record, index) => index" :columns="goodsColumns" :dataSource="tableData" :pagination="false" ref="table">
      <span slot="productPrice" slot-scope="text, record">
        {{ statusType[record.status] }}
      </span>
    </a-table>
  </div>
</template>
<script>
export default {
  props: {
    tableData: {
      type: Array,
      default: null,
    },
  },
  data() {
    return {
      goodsColumns: [
        {
          title: '时间',
          align: 'center',
          dataIndex: 'createTime',
        },
        {
          title: '操作',
          dataIndex: 'type',

          width: '350px',
        },
        {
          title: '售后单状态',
          dataIndex: 'productPrice',
          align: 'center',
          scopedSlots: { customRender: 'productPrice' },
        },
        {
          title: '操作人',
          dataIndex: 'username',
          align: 'center',
        },
        {
          title: '备注',
          dataIndex: 'memo',
          align: 'center',
        },
      ],
      statusType: {
        0: '待寄回',
        1: '待仓库收货',
        2: '待退款',
        3: '已成功退款',
        4: '申请驳回',
        5: '取消退款',
      },
    }
  },
  computed: {},
}
</script>
<style lang="less" scoped>
.title {
  color: rgba(0, 0, 0, 0.85);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 24px;
}
</style>
